Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuya support #1997

Merged
merged 116 commits into from
Nov 20, 2019
Merged

Tuya support #1997

merged 116 commits into from
Nov 20, 2019

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Nov 17, 2019

Test build to resolve #1729

Need to:

  • fix broker interface
    see broker.h, simplify brokerPublish signature. this breaks backwards compatibility, but I guess I could restore it with old "type(int)" dispatching to a proper TBroker
  • take a look again if this is really relay / light provider
    (note: this could work outside of relay module completely, but wait until other providers are configured as such)
  • clean-up tuya classes
  • avoid breaking existing modules

@mcspr
Copy link
Collaborator Author

mcspr commented Nov 18, 2019

@tonilopezmr Small example of how pio test works b668030, which was previously just built by using g++ -o test test.cpp and bunch of asserts. This would probably benefit from proper Arduino framework layer emulation, perhaps it could even be reused from the current esp8266/Arduino testing framework (...but the last time I got lost in mocks dependencies implemented there...)
edit: Or this one https://github.com/bxparks/UnixHostDuino

I also wonder why tf I needed view objects instead of copying the data, restricting copy constructors.

@mcspr
Copy link
Collaborator Author

mcspr commented Nov 19, 2019

@davebuk btw I will merge this tomorrow.
Some changes to the logic are seemingly harmless, but I need to dig up the emulator program again just to be sure.

@davebuk
Copy link
Contributor

davebuk commented Nov 20, 2019

Great. I'll build a 1.14.0dev version once merged and then test.

@mcspr mcspr merged commit 9a5698b into xoseperez:dev Nov 20, 2019
@mcspr mcspr deleted the experimental/tuya branch November 20, 2019 22:14
@mcspr
Copy link
Collaborator Author

mcspr commented Nov 20, 2019

Note that unlike previous version, I tried to rework boot sequence to actually try to make use of relayBootN setting / "Relay Boot mode".

@davebuk
Copy link
Contributor

davebuk commented Nov 23, 2019

I have made a 1.14.0dev 2.5.2 core build and the dimmer is working fine. Really great work. I'm away for a few days but if you want any further tests running on this build, I'll see what I can do.

Thanks again.

@mattster98
Copy link

I got some plug-in relay modules that happily came over to Espurna with the tuya-convert process. Can anyone point me toward how to build for a relay module? Generic relay firmware doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firmware for Tuya dimmer
3 participants